package com.open.capacity.workflow3.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.open.capacity.commons.PageResult;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.open.capacity.commons.CodeEnum;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.collections4.MapUtils;

import com.open.capacity.workflow3.entity.NwfConfluence;
import com.open.capacity.workflow3.dao.NwfConfluenceDao;
import com.open.capacity.workflow3.service.NwfConfluenceService;


@Service
public class NwfConfluenceServiceImpl implements NwfConfluenceService {

    @Autowired
    private NwfConfluenceDao nwfConfluenceDao;


    public List<NwfConfluence> getList(String processId, String nodeId) {
        Map<String, Object> param = new HashMap<>();
        param.put("processId", processId);
        param.put("nodeId", nodeId);

        List<NwfConfluence> list = nwfConfluenceDao.findAll(param);
        return list;
    }

    public void save(NwfConfluence entity) {
        nwfConfluenceDao.save(entity);
    }

    public void delete(String processId, String nodeId) {
        nwfConfluenceDao.deleteByNodeId(processId, nodeId);
    }

}
